<?require_once('readmenu.php')?>

<div class="top-menu">

    <a href="/" class="logo"><img src="/img/crow-in.gif" alt="home"/></a>

    <ul class="menu1">
        <?foreach($upmenu as $menuitem):?>

        <li class="<?if($menuitem['first']):?>first<?endif;?>
                   <?if($menuitem['last']):?>last<?endif;?>">
        <h1>
            <?if($menuitem['selected']):?><em
                title="<?=$menuitem['title']?>"><?endif;
            ?><?if($menuitem['anchor']):?><a
                href="<?=$menuitem['href']?>"
                title="<?=$menuitem['title']?>"><?endif;
            ?><?=$menuitem['name']
            ?><?if($menuitem['anchor']):?></a><?endif;
            ?><?if($menuitem['selected']):?></em><?endif;?>
        </h1>
        </li>

        <?endforeach;?>
    </ul>

    <ul class="menu2">
        <?foreach($menu as $menuitem):?>

        <li class="<?if($menuitem['first']):?>first<?endif;?>
                   <?if($menuitem['last']):?>last<?endif;?>">
        <h2>
            <?if($menuitem['selected']):?><em
                title="<?=$menuitem['title']?>"><?endif;
            ?><?if($menuitem['anchor']):?><a
                href="<?=$menuitem['href']?>"
                title="<?=$menuitem['title']?>"><?endif;
            ?><?=$menuitem['name']
            ?><?if($menuitem['anchor']):?></a><?endif;
            ?><?if($menuitem['selected']):?></em><?endif;?>
        </h2>
        </li>

        <?endforeach;?>
    </ul>

    <ul class="menu3">

        <li class="first">
        <h3>
            <a class="first" href="<?=$pages['first']['href']?>">&lt;&lt;&lt;&lt;</a>
            <a class="prev" href="<?=$pages['prev']['href']?>">&lt;вперед</a>
        </h3>
        </li>

        <li class="last">
        <h3>
            <a class="next" href="<?=$pages['next']['href']?>">назад&gt;</a>
            <a class="last" href="<?=$pages['last']['href']?>">&gt;&gt;&gt;&gt;</a>
        </h3>
        </li>

        <?foreach ($pages['pages'] as $page):?>
        <li>
        <h3>
            <?if ($page['gap']):?>
                ...
            <?elseif ($page['current']):?>
                <em><a class="current" href="<?=$page['href']?>"><?=$page['number']?></a></em>
            <?else:?>
                <a href="<?=$page['href']?>"><?=$page['number']?></a>
            <?endif;?>
        </h3>
        </li>
        <?endforeach;?>

    </ul>

</div>
